import {nodeResolve} from "@rollup/plugin-node-resolve";
import PluginVue from "rollup-plugin-vue";
import commonjs from "@rollup/plugin-commonjs";
import replace from "@rollup/plugin-replace";

export default {
  input: './src/js/journal.js',
  external: ['vue'],
  plugins: [
    nodeResolve(),
    PluginVue({
      preprocessStyles: true,
    }),
    commonjs(),
    replace({
      "process.env.NODE_ENV": JSON.stringify("development"),
      preventAssignment:true,
    }),
  ],
  output: {
    name: 'journal',
    file: 'dist/journal.iife.js',
    format: 'iife',
    globals: {
      vue: 'Vue',
    }
  }
}